﻿using System;
using System.Windows.Forms;
using Autodesk.Revit.Attributes;
using Autodesk.Revit.DB;
using Autodesk.Revit.UI;

namespace HYElectricDim
{
	[Transaction(TransactionMode.Manual)]
	internal class CmdCableTrenchSectionView : IExternalCommand
	{
		public Result Execute(ExternalCommandData commandData, ref string message, ElementSet elements)
		{
			CableTrenchSectionForm cableTrenchSectionForm = new CableTrenchSectionForm();
			if (cableTrenchSectionForm.ShowDialog() == DialogResult.OK)
			{
				new CableTrenchDraw(commandData, cableTrenchSectionForm.m_TemplePlan).Drawing(cableTrenchSectionForm.m_nRatio);
			}
			return Autodesk.Revit.UI.Result.Succeeded;
		}
	}
}
